package org.example;

import lombok.Data;

import java.time.LocalDateTime;

@Data
public class ChatMessage {
    private String from;
    private String content;
    private String type; // "MESSAGE", "JOIN", "LEAVE"
    private LocalDateTime timestamp;

    // 构造器、getter和setter
    public ChatMessage() {
        this.timestamp = LocalDateTime.now();
    }

    // 省略getter和setter...
}